package wqh.global;


import java.util.HashMap;
import java.util.Map;

public class GlobalRole {

    private static final Map<String,String> roleMap = new HashMap<String, String>();

    public static  synchronized void addRole(String userName, String roleName)
    {
        roleMap.put(userName,roleName);
    }

    public static synchronized void removeRoleByUserName(String userNmae)
    {
        roleMap.remove(userNmae);
    }

    public static synchronized String getRoleNameByUserName(String userNmae)
    {
        return roleMap.get(userNmae);
    }


}
